package cc.git.liuyan.customeraiagent.core.vectordatabase;

import java.math.BigDecimal;
import java.util.List;

public interface VectorDataBase {
    //创建知识库对用的向量数据库存储Collection
    void createKnowledgeVectorCollection(int denseDimension, int sparseDimension);

    //删除知识库对应的向量
    void deleteKnowledgeTrain(Long knowledgeId);

    //插入知识库分片对应的向量
    void trainKowledge(KnowledgeVectorData knowledgeVectorData);

    //关联知识库搜索
    List<String> relationKnowledgeSearch(List<Long> knowledgeIds, List<BigDecimal> denseVectors, List<BigDecimal> sparseVectors);

    //创建Text2Sql对用的向量数据库存储Collection  ddl和remark共用
    void createText2SqlVectorCollection(int denseDimension, int sparseDimension);

    //插入数据库/备注对应的向量
    void trainText2Sql(MysqlSchemaVectorData mysqlSchemaVectorData);

    //删除Text2Sql remark的向量
    void deleteText2SqlTrainRemark(Long knowledgeId, Long remarkId);

    //删除Text2Sql ddl的向量
    void deleteText2SqlTrainDdl(Long knowledgeId, String ddlSchema, String ddlTable);

    //关联schema搜索
    List<String> relationSchemaSearch(List<BigDecimal> denseVectors, List<BigDecimal> sparseVectors);

    //关联remark搜索
    List<String> relationRemarkSearch(List<BigDecimal> denseVectors, List<BigDecimal> sparseVectors);
}
